package cn.cmcc.intertelecom.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.cmcc.intertelecom.bean.Module;
import cn.cmcc.intertelecom.bean.ModuleExample;
import cn.cmcc.intertelecom.bean.ModuleExample.Criteria;
import cn.cmcc.intertelecom.dao.ModuleMapper;

@Service
public class ModuleService {
	@Autowired
	private ModuleMapper moduleMapper;

	public List<Module> selectAllModule() {
		
		return moduleMapper.selectByExample(null);
	}

	public List<Module> selectModuleByModuleIds(List<Integer> moduleIds) {
		ModuleExample example=new ModuleExample();
		Criteria criteria = example.createCriteria();
		criteria.andIdIn(moduleIds);
		return moduleMapper.selectByExample(example);
		
	}
	
}
